package com.jade.zsy.base.entity;

import com.jade.bss.db.IdEntity;
import com.jade.zsy.base.common.StatusConstant;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: jinya
 * Date: 2017/6/3
 * Time: 12:59
 * TEL :17701640710   MAIL:2009_jinya@163.com
 * To change this template use File | Settings | File Templates.
 */
@Data
@Entity
@Table(name = "ZSY_BASE_SKU_CLASS")
public class SkuClass  extends IdEntity {
    @Column(name = "parent_id", nullable = false,updatable = true,length = 100)
    private int parentId=0;
    @Column(name = "photo", nullable = true, updatable = false)
    private String photo;
    @Column(name = "name", nullable = false,updatable = true,length = 100)
    private String name;
    @Column(name = "sequence", nullable = false,updatable = true,length = 100)
    private int sequence=0;
    @Column(name = "keywords", nullable = true,updatable = true)
    private String keywords;
    @Column(name = "description", nullable = true,updatable = true)
    private String description;
    @Column(name = "specId", nullable = true,updatable = true)
    private long specId=0;
    @Column(name = "level", nullable = true,updatable = true)
    private int level=1;
    @Column(name = "status", updatable = true, nullable = false, length = 25)
    private int status= StatusConstant.RECORD_INIT; /** 状态 **/
    @Transient
    private List<SkuClass> childs = new ArrayList();
    @Transient
    private SkuClass parent;

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSequence() {
        return sequence;
    }

    public void setSequence(int sequence) {
        this.sequence = sequence;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public long getSpecId() {
        return specId;
    }

    public void setSpecId(long specId) {
        this.specId = specId;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public List<SkuClass> getChilds() {
        return childs;
    }

    public void setChilds(List<SkuClass> childs) {
        this.childs = childs;
    }

    public SkuClass getParent() {
        return parent;
    }

    public void setParent(SkuClass parent) {
        this.parent = parent;
    }
}
